<%-- 
    Document   : header
    Created on : May 2, 2013, 12:37:40 PM
    Author     : DIEM PHUONG
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>

<!-- Account -->
<div>
    <c:choose>
        <c:when test="${not empty(sessionScope.USER)}">
            <c:set var="user" value="${sessionScope.USER}"/>
            <c:set var="role" value="${sessionScope.ROLE}"/>
            <c:set var="fullname" value="${sessionScope.FULLNAME}"/>
            <a style="float:left" href="Controller?btnAction=accountDetail"> <b>Welcome ${sessionScope.USER}!</b></a>
        </c:when>
        <c:otherwise>
            <a href="Controller?btnAction=account">Account</a>
        </c:otherwise>
    </c:choose>
    <c:if test="${not empty(sessionScope.USER)}">
        <a href="Controller?btnAction=logout">Logout</a>
    </c:if>
</div>

<!-- Search -->
<div>
    <form action="Controller" method="POST">
        <input type="text" name="txtSearch" value="${param.txtSearch}" id="search" placeholder="Search..."/>
        <button type="submit" name="btnAction" value="search">Search</button>
    </form>
</div>